<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <!-- Apple devices fullscreen -->
        <meta name="apple-mobile-web-app-capable" content="yes">
        <!-- Apple devices fullscreen -->
        <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
        <title>图片选择 - v1.6.7</title>
        <link rel="stylesheet" type="text/css" href="/public/plugins/uploadimgnew/layui/css/layui.css?v=v1.6.7">
        <link rel="stylesheet" type="text/css" href="/public/plugins/uploadimgnew/css/image-upload.css?v=v1.6.7">
        <link href="/public/static/admin/font/css/font-awesome.min.css?v=v1.6.7" rel="stylesheet" />
                    <link href="/public/static/admin/css/theme_style.css?v=v1.6.7_1720001269" rel="stylesheet" type="text/css">
                <link href="/public/static/admin/font/css/iconfont.css?v=v1.6.7" rel="stylesheet" />
        <link rel="stylesheet" href="/public/plugins/ztree/css/zTreeStyle/zTreeStyle.css?v=v1.6.7" type="text/css">
        <script type="text/javascript" src="/public/static/common/js/jquery.min.js?v=v1.6.7"></script>
        <script type="text/javascript" src="/public/plugins/layer-v3.1.0/layer.js?v=v1.6.7"></script>
        <script type="text/javascript" src="/public/plugins/uploadimgnew/layui/layui.js?v=v1.6.7"></script>
        <script type="text/javascript" src="/public/plugins/uploadimgnew/js/jquery.cookie.js?v=v1.6.7"></script>
        
        <style type="text/css">
            .group-item .group-button {display: none;}
            .group-item:hover .group-button {display: block;}
            .group-item:hover .group-count {display: none;}
            .ztree .node_name{
                font-size: 13px !important;
            }
            .hover{
                line-height: 22px;
            }
            .ui-layout-pane {   
                background: #fff;   
            } 
            .ui-layout-center{
                padding:0 15px 0 15px;
            }
            .ztree li a {
                display: inline-block !important;
            }
            .ztree li a.curSelectedNode{
                height: 20px;
            }
        </style>
        <script type="text/javascript">
            // var eyou_basefile = "/login.php";
            // var module_name = "admin";
            // var __root_dir__ = "";
            // var __lang__ = "cn";
        </script>
        
        
        <link href="css/index.css" rel="stylesheet" type="text/css" />
    <script src="js/vue.min.js"></script>
    <script src="js/vue-resource.min.js"></script>
    <script src="js/index.js"></script>
        
        
    </head>

    <body>
        <div class="upload-box ui-layout-center" id="app">
            <div class="upload-body">
                <div class="upload-main">
                    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                        <ul class="layui-tab-title">
                            <li id="bendi" class="layui-this">本地图片</li>
                            <li id="tiqu">远程图片</li>
                        </ul>
                        <div class="layui-tab-content" style="height: 100%;">
                            <div class="layui-tab-item layui-show" id="bendi_cont">
                                <div class="upload-con">
                                    
                                    <iframe name="content_body" id="content_body" src="/uploadslist.html" width="100%" height="100%" frameborder="0" style="height: 460px;"></iframe>
                                </div>
                            </div>
                            <div class="layui-tab-item" id="tiqu_cont">
                                <div class="upload-con">
                                    
                                    
                                    
                                    
                                    <div class="image-selector-network">
                                        
                                        
                                        
                                        
                                        <form class="layui-form" id="layui-form" action="" method="post">
                                            
                                            <div style="width:100%;display:grid;grid-template-columns:auto 150px auto">
                                                <div></div>
                                                <img style="height:auto;width:150px" :src="image_url">
                                                <div></div>
                                            </div>
                                            
                                            
                                            
                                          <div class="layui-form-item">
                                            
                                            <label class="layui-form-label"></label>
                                            <div class="layui-input-inline" style="width: 400px;">
                                              <input type="text" v-model="image_url" name="imgremoteurl" lay-verify="imgremoteurl" autocomplete="off" placeholder="请输入图片地址" class="layui-input">
                                            </div>
                                           <div class="layui-input-inline">
                                              <a @click.prevent="uploadspost()" class="layui-btn layui-btn-normal">提取图片</a>
                                            </div>
                                          </div>
                                          <div class="layui-form-item">
                                            <label class="layui-form-label"></label>
                                            <div class="layui-form-mid layui-word-aux">
                                               需要http://.........大小不要超过50MB，支持图片类型 jpg|gif|png|bmp|jpeg|ico|webp                                            </div>
                                          </div>
                                        </form>  
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="upload-footer">
                    <button type="button" @click.prevent="ok()" class="layui-btn layui-btn-primary layui-btn-off ">取消</button>
                    <button type="button" @click.prevent="ok()" class="layui-btn layui-btn-normal layui-btn-yes ">确定</button>
                </div>
            </div>
        </div>
        <input type="hidden" id="input_type_id" value="0">
        <input type="hidden" id="input_top_tab" value="bendi">
        <script src="/public/static/admin/js/jquery.layout-latest.min.js?v=v1.6.7"></script>
        <script type="text/javascript" src="/public/plugins/ztree/js/jquery.ztree.core.min.js?v=v1.6.7"></script>
        <script type="text/javascript">
            var callback = "img_call_back";
            var num = "1";
        </script>
        <script type="text/javascript" src="/public/plugins/uploadimgnew/js/upload.js?v=v1.6.7"></script>
        
        
<script>
    var vm = new Vue({
		el: '#app',
		data: {
            id:0,
            image_url:""
		},
		created(){
		  //  let url=window.location.search;
		  //  let urlParams = new URLSearchParams(url);
		  //  this.id=urlParams.get("id");

		  //  this.searchtext=urlParams.get("searchtext");
		    

		    
		},
		mounted(){
		    
		},
		methods: {
		    uploadspost:function(){
		        this.$http.post('api/uploadspost.php',{
    		        image_url:this.image_url
    		    },{emulateJSON: true}).then(function(res){
    		        if(res.body.code==200){
    		            window.location.href="/uploads.html";
    		        }
    		    },function(){
    		        console.log("request fail");
    		    })
		    },
		    ok:function(){
		        $(".upload-box.ui-layout-center").hide();
		    }
		}
	})
</script>
        
        
        
    </body>
</html>
